В 12 шаге мы рассматривали обращение к системным DLL, пора написать свою. Естественно на VC по правилам DLL для Windows. Вот код. Правда на C:
// ExtCorel.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#define DLLExport __declspec(dllexport)
BOOL APIENTRY DllMain( HANDLE hModule,DWORD ul_reason_for_call,
LPVOID lpReserved)
{
return TRUE;
}
extern "C" DLLExport void
MyFucnt()
{
MessageBox(NULL,"Hello","Hello",MB_OK);
}
А вот и результат:
